A Calculus for Overload Functions with Subtyping

نویسندگان

  • G. CASTAGNA
  • G. GHELLI
  • G. LONGO
  • Giuseppe Castagna
  • Giorgio Ghelli
  • Giuseppe Longo
چکیده

We present a simple extension of typed-calculus where functions can be overloaded by putting diierent \branches of code" together. When the function is applied, the branch to execute is chosen according to a particular selection rule which depends on the type of the argument. The crucial feature of the present approach is that the branch selection depends on the \run-time type" of the argument , which may diier from its compile-time type, because of the existence of a subtyping relation among types. Hence overloading cannot be eliminated by a static analysis of code, but is an essential feature to be dealt with during computation. We obtain in this way a type-dependent calculus, which diiers from the various-calculi where types do not play any r^ ole during computation. We prove Connuence and a generalized Subject-Reduction theorem for this calculus. We prove Strong Normalization for a \stratiied" subcalculus. The deenition of this calculus is guided by the understanding of object-oriented features and the connections between our calculus and object-orientedness are extensively stressed. We show that this calculus provides a foundation for typed object-oriented languages which solves some of the problems of the standard record-based approach.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Encoding CDuce in the Cπ-calculus?

CDuce is a functional programming language featuring overloaded functions and a rich type system with recursive types, subtyping, union, negation and intersection types. The boolean constructors have a set-theoretic behaviour defined via a semantic interpretation of the types. The Cπ-calculus is an extension of the π-calculus that enriches Pierce and Sangiorgi π-calculus subtyping with union, i...

متن کامل

Full Abstraction in a Subtyped pi-Calculus with Linear Types

We introduce a concise pi-calculus with directed choices and develop a theory of subtyping. Built on a simple behavioural intuition, the calculus offers exact semantic analysis of the extant notions of subtyping in functional programming languages and session-based programming languages. After illustrating the idea of subtyping through examples, we show type-directed embeddings of two known sub...

متن کامل

Certain subclass of $p$-valent meromorphic Bazilevi'{c} functions defined by fractional $q$-calculus operators

The aim of the present paper is to introduce and investigate a new subclass of Bazilevi'{c} functions in the punctured unit disk $mathcal{U}^*$ which have been described through using of the well-known fractional $q$-calculus operators, Hadamard product and a linear operator. In addition, we obtain some sufficient conditions for the func...

متن کامل

A semantics for λ { } str : a calculus with overloading and late - binding

Up to now there was no interpretation available for λ-calculi featuring overloading and late-binding, although these are two of the main principles of any object-oriented programming language. In this paper we provide a new semantics for a stratified version of Castagna’s λ{}, a λ-calculus combining overloading with late-binding. The model-construction is carried out in EETJ + (Tot) + (F-IN), a...

متن کامل

From Amber to Coercion Constraints

Subtyping is a common tool in the design of type systems that finds its roots in the η-expansion of arrow types and the notion of type containment obtained by closing System F by η-expansion. Although strongly related, subtyping and type containment still significantly differ from one another when put into practice. We introduce coercion constraints to relate and generalize subtyping and type c...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1992